package com.authsphere.security.configurer.password.entity;

import com.authsphere.common.annotation.CaptchaField;
import com.authsphere.common.annotation.CryptField;
import com.authsphere.common.annotation.EnabledAuthSphereField;
import com.authsphere.common.annotation.NamedField;
import com.authsphere.common.enums.AlgorithmType;
import jakarta.validation.constraints.NotEmpty;

import java.io.Serial;
import java.io.Serializable;

/**
 * @program: AuthSphere
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/11 11:33
 **/
@EnabledAuthSphereField
public class UsernamePasswordEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 4110518055410552757L;

    /**
     * 用户名
     */
    @NotEmpty(message = "账号不能为空")
    @NamedField
    private String username;

    /**
     * 密码
     */
    @NotEmpty(message = "密码不能为空")
    @CryptField(algorithmType = AlgorithmType.AES)
    private String password;

    /**
     * 验证码
     */
    @CaptchaField
    private String verifyCode;

    private String goUrl;

    public String getGoUrl() {
        return goUrl;
    }

    public void setGoUrl(String goUrl) {
        this.goUrl = goUrl;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }
}
